-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic region to loops #2306
base: main
Are you sure you want to change the base?
Generic region to loops #2306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/1)
arg.getLoc(), arg, collapsedDims); | ||
rewriter.replaceAllUsesExcept(arg, linearizedArg->getResult(0), | ||
linearizedArg); | ||
for (auto user : linearizedArg->getUsers()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto user
can be declared as auto *user
for (auto user : linearizedArg->getUsers()) { | |
for (auto *user : linearizedArg->getUsers()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great pass documentation!
7b686f4
to
22f3e49
Compare
This change adds a few new passes:
linalg.generic
to affine passesSimply calls the upstream pass for converting a
linalg.generic
into an affine loop nest.Lower affine pass
Again, just uses an upstream pass for converting affine into SCF and arith.
Linearize memref accesses pass
A custom TTIR pass that takes a nested loop structure over n-dimensional memrefs and linearizes them into a single dimension. This is a useful because circular buffers in metal are only one-dimensional.
Example, this pass will convert the following code:
Into:
Closes #1910
Closes #1911